<?php
class GridArticleController extends AppController {

	function ajaxData() {
		$this->modelClass = "Browser_article";
		$this->autoRender = false;
		$sTable = "articles";
		//Estas son las tablas que toma de la base de datos
		$aColumns = array( 'codigo', 'descripcion', 'id');
		$output = $this->Browser_article->GetData_service($sTable, $aColumns);

		echo json_encode($output);
	}
	
	public function beforeFilter() {
		parent::beforeFilter();
		$this->Auth->allow('index', 'view');
	}
}